home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat3 / Tk / getclrmap.z / getclrmap
Text File  |  1998-10-30  |  6KB  |  133 lines

  1.  
  2.  
  3.  
  4. TTTTkkkk____GGGGeeeettttCCCCoooolllloooorrrrmmmmaaaapppp((((3333TTTTkkkk))))                                        TTTTkkkk____GGGGeeeettttCCCCoooolllloooorrrrmmmmaaaapppp((((3333TTTTkkkk))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      Tk_GetColormap, Tk_FreeColormap - allocate and free colormaps
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ttttkkkk....hhhh>>>>
  13.  
  14.      Colormap
  15.      TTTTkkkk____GGGGeeeettttCCCCoooolllloooorrrrmmmmaaaapppp((((_i_n_t_e_r_p, _t_k_w_i_n, _s_t_r_i_n_g))))
  16.  
  17.      TTTTkkkk____FFFFrrrreeeeeeeeCCCCoooolllloooorrrrmmmmaaaapppp((((_d_i_s_p_l_a_y, _c_o_l_o_r_m_a_p))))
  18.  
  19. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  20.      Tcl_Interp *_i_n_t_e_r_p    (in)      Interpreter to use for error reporting.
  21.  
  22.      Tk_Window  _t_k_w_i_n      (in)      Token for window in which colormap will
  23.                                      be used.
  24.  
  25.      char       *_s_t_r_i_n_g    (in)      Selects a colormap:  either nnnneeeewwww or the
  26.                                      name of a window with the same screen and
  27.                                      visual as _t_k_w_i_n.
  28.  
  29.      Display    *_d_i_s_p_l_a_y   (in)      Display for which _c_o_l_o_r_m_a_p was allocated.
  30.  
  31.      Colormap   _c_o_l_o_r_m_a_p   (in)      Colormap to free;  must have been
  32.                                      returned by a previous call to
  33.                                      TTTTkkkk____GGGGeeeettttCCCCoooolllloooorrrrmmmmaaaapppp or TTTTkkkk____GGGGeeeettttVVVViiiissssuuuuaaaallll.
  34.  
  35.  
  36. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  37.      These procedures are used to manage colormaps.  TTTTkkkk____GGGGeeeettttCCCCoooolllloooorrrrmmmmaaaapppp returns a
  38.      colormap suitable for use in _t_k_w_i_n.  If its _s_t_r_i_n_g argument is nnnneeeewwww then a
  39.      new colormap is created;  otherwise _s_t_r_i_n_g must be the name of another
  40.      window with the same screen and visual as _t_k_w_i_n, and the colormap from
  41.      that window is returned.  If _s_t_r_i_n_g doesn't make sense, or if it refers
  42.      to a window on a different screen from _t_k_w_i_n or with a different visual
  43.      than _t_k_w_i_n, then TTTTkkkk____GGGGeeeettttCCCCoooolllloooorrrrmmmmaaaapppp returns NNNNoooonnnneeee and leaves an error message
  44.      in _i_n_t_e_r_p->_r_e_s_u_l_t.
  45.  
  46.      TTTTkkkk____FFFFrrrreeeeeeeeCCCCoooolllloooorrrrmmmmaaaapppp should be called when a colormap returned by
  47.      TTTTkkkk____GGGGeeeettttCCCCoooolllloooorrrrmmmmaaaapppp is no longer needed.  Tk maintains a reference count for
  48.      each colormap returned by TTTTkkkk____GGGGeeeettttCCCCoooolllloooorrrrmmmmaaaapppp, so there should eventually be
  49.      one call to TTTTkkkk____FFFFrrrreeeeeeeeCCCCoooolllloooorrrrmmmmaaaapppp for each call to TTTTkkkk____GGGGeeeettttCCCCoooolllloooorrrrmmmmaaaapppp.  When a
  50.      colormap's reference count becomes zero, Tk releases the X colormap.
  51.  
  52.      TTTTkkkk____GGGGeeeettttVVVViiiissssuuuuaaaallll and TTTTkkkk____GGGGeeeettttCCCCoooolllloooorrrrmmmmaaaapppp work together, in that a new colormap
  53.      created by TTTTkkkk____GGGGeeeettttVVVViiiissssuuuuaaaallll may later be returned by TTTTkkkk____GGGGeeeettttCCCCoooolllloooorrrrmmmmaaaapppp.  The
  54.      reference counting mechanism for colormaps includes both procedures, so
  55.      callers of TTTTkkkk____GGGGeeeettttVVVViiiissssuuuuaaaallll must also call TTTTkkkk____FFFFrrrreeeeeeeeCCCCoooolllloooorrrrmmmmaaaapppp to release the
  56.      colormap.  If TTTTkkkk____GGGGeeeettttCCCCoooolllloooorrrrmmmmaaaapppp is called with a _s_t_r_i_n_g value of nnnneeeewwww then
  57.      the resulting colormap will never be returned by TTTTkkkk____GGGGeeeettttVVVViiiissssuuuuaaaallll;  however,
  58.      it can be used in other windows by calling TTTTkkkk____GGGGeeeettttCCCCoooolllloooorrrrmmmmaaaapppp with the
  59.      original window's name as _s_t_r_i_n_g.
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. TTTTkkkk____GGGGeeeettttCCCCoooolllloooorrrrmmmmaaaapppp((((3333TTTTkkkk))))                                        TTTTkkkk____GGGGeeeettttCCCCoooolllloooorrrrmmmmaaaapppp((((3333TTTTkkkk))))
  71.  
  72.  
  73.  
  74. KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  75.      colormap
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.